package com.asia5b.a5mall.member.adapter

import com.asia5b.a5mall.member.R
import com.asia5b.a5mall.middleware.model.member.CountryModel
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * 选择国家手机区号
 * type 0是选择区号， 1234是选择国家/区域/州
 */
class PhoneCodeAdapter(list: MutableList<CountryModel>) :
        BaseQuickAdapter<CountryModel, BaseViewHolder>(R.layout.item_phone_code, list) {

    override fun convert(helper: BaseViewHolder, item: CountryModel) {
        helper.setText(R.id.tv_country_name, item?.country_name)
        helper.setText(R.id.tv_country_code, "+" + item?.country_code)
    }
}